package com.kpmg.datalake.vbaapi.vo;

import com.alibaba.fastjson.JSONObject;

import java.io.Serializable;
import java.util.List;

/**
 * @author timqian
 * @author alex [alex.zhao@kpmg.com]
 * @create 2018-05-17
 * @desc VBA节点对象，可用于树
 */
public class VbaMenuNodeVO implements Serializable {
    private static final long serialVersionUID = -4855006131258838140L;
	/**
	 * 节点Id
	 */
	private String nodeId;
	/**
	 * 节点名称
	 */
	private String nodeName;
	/**
	 * 节点说明
	 */
	private String nodeDesc;
	/**
	 * 节点级别
	 */
    private Integer nodeLevel;
	/**
	 * 是否存在子节点
	 */
    private Boolean hasChild = false;
	/**
	 * 节点是否触发事件
	 */
    private Boolean triggerEvent = false;
	/**
	 * 子节点集合
	 */
	private List<VbaMenuNodeVO> childList;
	
	public VbaMenuNodeVO(String nodeId, String nodeName, String nodeDesc) {
		this.nodeId = nodeId;
		this.nodeName = nodeName;
		this.nodeDesc = nodeDesc;
	}
	
	public VbaMenuNodeVO(String nodeId, String nodeName, String nodeDesc, int nodeLevel, boolean hasChild, boolean triggerEvent, List<VbaMenuNodeVO> childList) {
		this.nodeId = nodeId;
		this.nodeName = nodeName;
		this.nodeDesc = nodeDesc;
		this.nodeLevel = nodeLevel;
		this.hasChild = hasChild;
		this.triggerEvent = triggerEvent;
		this.childList = childList;
	}
	
	public String getNodeId() {
		return nodeId;
	}
	public void setNodeId(String nodeId) {
		this.nodeId = nodeId;
	}
	public String getNodeName() {
		return nodeName;
	}
	public void setNodeName(String nodeName) {
		this.nodeName = nodeName;
	}
	public String getNodeDesc() {
		return nodeDesc;
	}
	public void setNodeDesc(String nodeDesc) {
		this.nodeDesc = nodeDesc;
	}

    public Integer getNodeLevel() {
		return nodeLevel;
	}

    public void setNodeLevel(Integer nodeLevel) {
		this.nodeLevel = nodeLevel;
	}

    public Boolean isHasChild() {
		return hasChild;
	}

    public void setHasChild(Boolean hasChild) {
		this.hasChild = hasChild;
	}

    public Boolean isTriggerEvent() {
		return triggerEvent;
	}

    public void setTriggerEvent(Boolean triggerEvent) {
		this.triggerEvent = triggerEvent;
	}
	public List<VbaMenuNodeVO> getChildList() {
		return childList;
	}
	public void setChildList(List<VbaMenuNodeVO> childList) {
		this.childList = childList;
	}

    @Override
    public String toString() {
        return "VbaMenuNodeVO" + JSONObject.toJSONString(this);
    }
}
